package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallUserAccountWithdraw;
import com.appkubes.mall.core.po.MallUserAccountWithdrawExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallUserAccountWithdrawMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_account_withdraw
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserAccountWithdrawSqlProvider.class, method="countByExample")
    long countByExample(MallUserAccountWithdrawExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_account_withdraw
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallUserAccountWithdrawSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallUserAccountWithdrawExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_account_withdraw
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_user_account_withdraw",
        "where account_withdraw_key = #{accountWithdrawKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String accountWithdrawKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_account_withdraw
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_user_account_withdraw (account_withdraw_key, app_key, ",
        "user_key, withdraw_money, ",
        "source_type, bank_card_num, ",
        "bank_name, real_name, ",
        "real_tel, `state`, ",
        "create_time, update_time, ",
        "version)",
        "values (#{accountWithdrawKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{userKey,jdbcType=VARCHAR}, #{withdrawMoney,jdbcType=DECIMAL}, ",
        "#{sourceType,jdbcType=VARCHAR}, #{bankCardNum,jdbcType=VARCHAR}, ",
        "#{bankName,jdbcType=VARCHAR}, #{realName,jdbcType=VARCHAR}, ",
        "#{realTel,jdbcType=VARCHAR}, #{state,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallUserAccountWithdraw record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_account_withdraw
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallUserAccountWithdrawSqlProvider.class, method="insertSelective")
    int insertSelective(MallUserAccountWithdraw record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_account_withdraw
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserAccountWithdrawSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="account_withdraw_key", property="accountWithdrawKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="withdraw_money", property="withdrawMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="source_type", property="sourceType", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_card_num", property="bankCardNum", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_name", property="bankName", jdbcType=JdbcType.VARCHAR),
        @Result(column="real_name", property="realName", jdbcType=JdbcType.VARCHAR),
        @Result(column="real_tel", property="realTel", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallUserAccountWithdraw> selectByExampleWithRowbounds(MallUserAccountWithdrawExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_account_withdraw
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserAccountWithdrawSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="account_withdraw_key", property="accountWithdrawKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="withdraw_money", property="withdrawMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="source_type", property="sourceType", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_card_num", property="bankCardNum", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_name", property="bankName", jdbcType=JdbcType.VARCHAR),
        @Result(column="real_name", property="realName", jdbcType=JdbcType.VARCHAR),
        @Result(column="real_tel", property="realTel", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallUserAccountWithdraw> selectByExample(MallUserAccountWithdrawExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_account_withdraw
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "account_withdraw_key, app_key, user_key, withdraw_money, source_type, bank_card_num, ",
        "bank_name, real_name, real_tel, `state`, create_time, update_time, version",
        "from mall_user_account_withdraw",
        "where account_withdraw_key = #{accountWithdrawKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="account_withdraw_key", property="accountWithdrawKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="withdraw_money", property="withdrawMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="source_type", property="sourceType", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_card_num", property="bankCardNum", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_name", property="bankName", jdbcType=JdbcType.VARCHAR),
        @Result(column="real_name", property="realName", jdbcType=JdbcType.VARCHAR),
        @Result(column="real_tel", property="realTel", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallUserAccountWithdraw selectByPrimaryKey(String accountWithdrawKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_account_withdraw
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserAccountWithdrawSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallUserAccountWithdraw record, @Param("example") MallUserAccountWithdrawExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_account_withdraw
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserAccountWithdrawSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallUserAccountWithdraw record, @Param("example") MallUserAccountWithdrawExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_account_withdraw
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserAccountWithdrawSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallUserAccountWithdraw record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_account_withdraw
     *
     * @mbg.generated
     */
    @Update({
        "update mall_user_account_withdraw",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "user_key = #{userKey,jdbcType=VARCHAR},",
          "withdraw_money = #{withdrawMoney,jdbcType=DECIMAL},",
          "source_type = #{sourceType,jdbcType=VARCHAR},",
          "bank_card_num = #{bankCardNum,jdbcType=VARCHAR},",
          "bank_name = #{bankName,jdbcType=VARCHAR},",
          "real_name = #{realName,jdbcType=VARCHAR},",
          "real_tel = #{realTel,jdbcType=VARCHAR},",
          "`state` = #{state,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP},",
          "version = #{version,jdbcType=INTEGER}",
        "where account_withdraw_key = #{accountWithdrawKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallUserAccountWithdraw record);
}